have a computer do the calculations for you (which we always recommend), you technically don’t
have to read this section. But we encourage you to read this section anyway so you’ll have a better
appreciation for the strengths and limitations of this test.
This test is conceptually pretty simple. Instead of taking the product of the marginals and
dividing it by the total for each cell as is done with the chi-square test statistic, Fisher exact test
looks at every possible table that has the same marginal totals as your observed table. You
calculate the exact probability (Pr) of getting each individual table using a formula that, for a
fourfold table (using the notation for Figure 12-6), is
Those exclamation points indicate calculating the factorials of the cell counts (see Chapter 2). For the
example in Figure 12-1, the observed table has a probability of
Other possible tables with the same marginal totals as the observed table have their own Pr values,
which may be larger than, smaller than, or equal to the Pr value of the observed table. The Pr values
for all possible tables with a specified set of marginal totals always add up to exactly 1.
The Fisher Exact test p value is obtained by adding up the Pr values for all tables that are at least as
different from the
as your observed table. For a fourfold table that means adding up all the Pr
values that are less than (or equal to) the Pr value for your observed table.
For the example in Figure 12-1, the p value comes out to 0.00385, which means that there’s only 1
chance in 260 (because
) that random fluctuations could have produced such an
apparent effect in your sample.
Noting the pros and cons of the Fisher Exact test
The big advantages of the Fisher Exact test are as follows:
It gives the exact p value.
It is exact for all tables, with large or small (or even zero) cell counts.
Why do people still use the chi-square test, which is approximate and doesn’t work for tables
with small cell counts? Well, there are several problems with the Fisher Exact test:
The Fisher calculations are a lot more complicated, especially for tables larger than
. Many
statistical software packages either don’t offer the Fisher Exact test or offer it only for fourfold
tables. Even if they offer it, you may execute the test and find that it fails to finish the test, and you
have to break into the program to stop the procedure. Also, some interactive web pages perform
the Fisher Exact test for fourfold tables (including